extends ../layout

block content
  .container
    .row
      table.table.table-hover.table-bordered.table-responsive
        thead
          tr
            th 分类名称
            th 添加时间
            th 查看
            th 更新
            th 删除
        tbody
          each item in categories
            tr(class="item-id-"+item._id)
              td= item.name
              td= moment(item.meta.updateAt).format('MM/DD/YYYY')
              td: a(target="_blank", href="../../category/"+item._id) 查看
              td: a(target="_blank", href="../../admin/category/update/"+item._id) 修改
              td: button.btn.btn-danger.del(type="button", data-id=item._id) 删除
          tr: td: td: td: td
            td: a(target="_self", href="/admin/category/new")
              button.btn.btn-success.del(type="button") 添加
  script(src="/js/categoryAdmin.js")
